from bald_spider.utils.request import request_fingerprint

VERSION = 1.0

CONCURRENCY= 16

PROJECT_NAME='Bald_spider'

LOG_LEVEL = 'INFO'

REQUEST_TIMEOUT = 5

VERIFY_SSL = True

USE_SESSION = True

DOWNLOADER= "bald_spider.core.downloader.aiohttp_downloader.AioDownloader"

INTERVAL = 60

STATS_DUMP = True

DOWNLOAD_DELAY = 0

RANDOMNESS = True

RANDOM_RANGE = (0.75,1.25)

# retry
RETRY_HTTP_CODES = [408,429,500,502,503,504,522,524]
IGNORE_HTTP_CODES = [403,404]
MAX_RETRY_TIMES = 2
ALLOWED_CODES = []
RETRY_PRIORITY= -1

# filter
FILTER_DEBUG = True
FILTER_CLS = "bald_spider.duplicate_filter.memory_filter.MemoryFilter"

#redis
REDIS_URL ="redis://localhost:6379/0" #redis://[[username]:[password]]@localhost:6379/0
DECODE_RESPONSES = True
SAVE_FP = False
REDIS_KEY="request_fingerprint"

DEPTH_PRIORITY=1
REQUEST_DIR = '.'